public class Solution1232 {
    public boolean checkStraightLine(int[][] coordinates) {
        int x=coordinates[1][0]-coordinates[0][0];
        int y=coordinates[1][1]-coordinates[0][1];
        for (int i=1;i<coordinates.length-1;i++){
            int xx=coordinates[i+1][0]-coordinates[i][0];
            int yy=coordinates[i+1][1]-coordinates[i][1];
            if (x*yy!=xx*y){
                return false;
            }
        }
        return true;
    }

    public static void main(String[] args) {
        System.out.println(new Solution1232().checkStraightLine(new int[][]{{1,2},{2,3},{3,4},{4,5},{5,6}}));
    }
}
